package com.yunshang.shoppingmall.service.impl;

import com.yunshang.shoppingmall.entity.Collect;
import com.yunshang.shoppingmall.mapper.CollectMapper;
import com.yunshang.shoppingmall.service.CollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("collectService")
public class CollectSericeImpl implements CollectService {

    @Autowired
    CollectMapper collectMapper;

    @Override
    public int deleteByPrimaryKey(Integer collectId) {
        return collectMapper.deleteByPrimaryKey(collectId) ;
    }

    @Override
    public int insert(Collect record) {
        return collectMapper.insert(record);
    }

    @Override
    public int insertSelective(Collect record) {
        return collectMapper.insertSelective(record);
    }

    @Override
    public Collect selectByPrimaryKey(Integer collectId) {
        return collectMapper.selectByPrimaryKey(collectId);
    }

    @Override
    public int updateByPrimaryKeySelective(Collect record) {
        return collectMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Collect record) {
        return collectMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<Collect> selectAllByUserNoId(int userNoId) {
        return collectMapper.selectAllByUserNoId(userNoId);
    }

    @Override
    public List<Collect> selectByUserNoIdAndProId(int userNoId, int proId) {
        return collectMapper.selectByUserNoIdAndProId(userNoId,proId);
    }
}
